﻿Imports Cls_Common
Imports VSModel
Imports System.Data
Partial Class FrontEnd_Control_Menu_Detail
    Inherits System.Web.UI.UserControl

    Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
        If Not IsPostBack Then
            BindInfo(Page.RouteData.Values("MenuId"))
        End If
    End Sub
    Protected Sub BindInfo(ByVal _id As Integer)

        Using Data As New VSEntities
            Dim p = (From q In Data.Menus Where q.MenuId = _id Select q).FirstOrDefault
            If Not p Is Nothing Then
                hplTitle.Text = p.Title
                hplTitle.NavigateUrl = MainDomain & p.QueryString & "-" & p.MenuId & ".html"
                Page.Title = p.Title
                ltrContent.Text = p.Description
            End If
        End Using

    End Sub

End Class
